{extend name='public/base'} {block name='content'}

<!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        {$item['item1']}
        <small>{$item['item2']}</small>
    </h1>
    <ol class="breadcrumb">
        <li>
            <a href="#">
                <i class="fa fa-dashboard"></i> {$item['item1']}</a>
        </li>
        <li class="active">{$item['item2']}</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">搜索栏</h3>
        </div>
    
        <form class="form-horizontal layui-form" action="{:url('admin/recipel/index')}" method="get">
            <div class="box-body" style="padding: 15px;">
                <div>
                    <div class="col-sm-2">
                        <input type="text" name="clinic" value="{$clinic|default=''}" class="form-control" placeholder="请输入诊所名称">
                    </div>
                    <div class="col-sm-2">
                        <input type="text" name="name" value="{$name|default=''}" class="form-control" placeholder="请输入姓名">
                    </div>
    
                    <div class="col-sm-1">
                        <button type="submit" class="layui-btn layui-btn-sm layui-btn-warm">搜索</button>
                    </div>
                </div>
            </div>
        </form>
    </div>



    <blockquote class="layui-elem-quote layui-text clw">
        <form class="form-horizontal layui-form" action="{:url('admin/recipel/export')}" method="post">
            <div class="box-body">
                <div>
                    <div class="col-sm-2">
                        <input type="text" name="clinic" value="{$clinic|default=''}" class="form-control" placeholder=" 请输入诊所名称">
                    </div>
                    <div class="col-sm-2">
                        <input type="text" name="name" value="{$name|default=''}" class="form-control" placeholder="请输入姓名">
                    </div>
    
                    <div class="col-sm-1">
                        <button lay-filter="toSubmit" class="layui-btn layui-btn-sm layui-btn-warm">确定导出</button>
                    </div>
                </div>
            </div>
        </form>
    </blockquote>
    <div class="row">
        <div class="col-xs-12">
            <!-- /.box -->
            <div class="box">
                <div class="box-header">
                    <h3 class="box-title">列表</h3>
                    <span class="total">总共&nbsp;{$list->total()}&nbsp;条记录</span>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <table class="layui-table" lay-data="{height: '', cellMinWidth: 80,url:'', page:false,limit:20,id:'id'}" lay-filter="goodslist">
                        <thead>
                            <tr>
                                <th lay-data="{field:'id', sort: true}">编号</th>
                                <th lay-data="{field:'clinic', sort: true}">诊所名称</th>
                                <th lay-data="{field:'name', sort: true}">姓名</th>
                                <th lay-data="{field:'sex', sort: true}">性别</th>
                                <th lay-data="{field:'age', sort: true}">年龄</th>
                                <th lay-data="{field:'category', sort: true}">科别</th>
                                <th lay-data="{field:'address', sort: true}">住址电话</th>
                                <th lay-data="{field:'diagnosis', sort: true}">诊断</th>
                                <th lay-data="{field:'allergy', sort: true}">过敏史</th>
                                <th lay-data="{field:'alldrug', sort: true}">药品</th>
                                <th lay-data="{field:'doctor', sort: true}">医生</th>
                                <th lay-data="{field:'amount', sort: true}">药费</th>
                                <th lay-data="{field:'total_amount', sort: true}">总计</th>
                                <th lay-data="{field:'time', sort: true}">时间</th>
                            </tr>
                        </thead>
                        <tbody>
                            {volist name='list' id='vo'}
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.clinic}</td>
                                <td>{$vo.name}</td>
                                <td>{$vo.sex}</td>
                                <td>{$vo.age}</td>
                                <td>{$vo.category}</td>
                                <td>{$vo.address}</td>
                                <td>{$vo.diagnosis}</td>
                                <td>{$vo.allergy}</td>
                                <td>{$vo.alldrug}</td>
                                <td>{$vo.doctor}</td>
                                <td>{$vo.amount}</td>
                                <td>{$vo.total_amount}</td>
                                <td>{$vo.time}</td>
                            </tr>
                            {/volist}

                        </tbody>
                    </table>
                    <div class="page page_right">
                        <div>
                            {$list->render()}
                        </div>
                    </div>
                </div>
                <!-- /.box-body -->
            </div>
            <!-- /.box -->
        </div>
        <!-- /.col -->
    </div>
    <!-- /.row -->

</section>
<!-- /.content -->
{/block}

<!-- 引入js 必须要这两个 2018年1月22日10:06:35-->
{block name='js'}
<script>
    layui.use('table', function () {
        var table = layui.table;
        //监听表格复选框选择
        table.on('checkbox(demo)', function (obj) {
            console.log(obj)
        });


    });
</script> {/block} {block name='script'} {/block}